/*
 * Copyright 2002-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package nl.jteam.jsa.core.metadata;

/**
 * A strategy to define how a field should be indexed by the search engine.
 *
 * @author Uri Boness
 */
public interface FieldIndexStrategy {

    /**
     * Returns the default boost factor that should be used when computing hit ranks.
     *
     * @return The default boost factor that should be used when computing hit ranks.
     * @see nl.jteam.jsa.core.Boostable
     */
    float getDefaultBoostFactor();

    /**
     * Returns whether the field values should be stored in the index. When set to <code>false</code>, reconstructing
     * these values from the index might not be supported by the search engine provider.
     *
     * @return Whether the field values should be stored in the index.
     */
    boolean isStored();

    /**
     * Returns whether the field values should be indexed and therefore be processed on search requests.
     *
     * @return Whether the field values should be indexed and therefore be processed on search requests.
     */
    boolean isIndexed();

    /**
     * Returns whether the values of this fields should be tokenized or rather the values should be indexed as an atomic
     * chunks of text. This property is applicable only on text-based fields.
     *
     * @return Whether the values of this fields should be tokenized or not.
     */
    boolean isTokenized();

    /**
     * Returns whether the values of the fields should be stored in the index in a compressed manner.
     *
     * @return Whether the values of the fields should be stored in the index in a compressed manner.
     */
    boolean isCompressed();

    
    boolean isTermVectorStored();

    boolean isStoreOffsetWithTermVector();

    /**
     * Returns whether the field values terms are stored as term vector together with their token positions.
     *
     * @return Whether the field values terms are stored as term vector together with their token positions.
     */
    boolean isStorePositionWithTermVector();


    boolean isNormsOmitted();

}
